/*
* Sun Public License Notice
*
* The contents of this file are subject to the Sun Public License
* Version 1.0 (the "License"). You may not use this file except in
* compliance with the License. A copy of the License is available at
* http://www.sun.com/
*
* The Original Code is NetBeans. The Initial Developer of the Original
* Code is Sun Microsystems, Inc. Portions Copyright 1997-2001 Sun
* Microsystems, Inc. All Rights Reserved.
*/
package org.netbeans.modules.vcs.advanced;
/**
*
* @author Pavel Buzek
* @version
*/
public class CustomizeConfigurationsDialog extends javax.swing.JDialog {
static final long serialVersionUID =2037331720452626895L;
/** Initializes the Form */
public CustomizeConfigurationsDialog(java.awt.Frame parent, boolean modal) {
super (parent, modal);
initComponents ();
pack ();
}
/** This method is called from within the constructor to
* initialize the form.
* WARNING: Do NOT modify this code. The content of this method is
* always regenerated by the FormEditor.
*/
private void initComponents () {//GEN-BEGIN:initComponents
// This code was developed using a non-commercially licensed version of NetBeans Developer 2.x.
// For details, see http://www.netbeans.com/non_commercial.html
setBackground (new java.awt.Color (192, 192, 192));
setTitle ("Available configurations:");
setModal (true);
setName ("Customize configurations:");
addWindowListener (new java.awt.event.WindowAdapter () {
public void windowClosing (java.awt.event.WindowEvent evt) {
closeDialog (evt);
}
}
);
getContentPane ().setLayout (new java.awt.GridBagLayout ());
java.awt.GridBagConstraints gridBagConstraints1;
listScrollPane = new java.awt.ScrollPane ();
listScrollPane.setName ("listScrollPane");
list = new javax.swing.JList ();
list.setSelectionMode (javax.swing.ListSelectionModel.SINGLE_SELECTION);
list.setMinimumSize (new java.awt.Dimension(100, 60));
listScrollPane.add (list);
gridBagConstraints1 = new java.awt.GridBagConstraints ();
gridBagConstraints1.gridx = 0;
gridBagConstraints1.gridheight = 5;
gridBagConstraints1.fill = java.awt.GridBagConstraints.BOTH;
gridBagConstraints1.insets = new java.awt.Insets (5, 5, 5, 5);
gridBagConstraints1.anchor = java.awt.GridBagConstraints.NORTHWEST;
gridBagConstraints1.weightx = 0.9;
gridBagConstraints1.weighty = 0.8;
getContentPane ().add (listScrollPane, gridBagConstraints1);
addButton = new javax.swing.JButton ();
addButton.setText ("Add");
addButton.setLabel ("Add");
addButton.setName ("ADD");
addButton.addActionListener (new java.awt.event.ActionListener () {
public void actionPerformed (java.awt.event.ActionEvent evt) {
addButtonActionPerformed (evt);
}
}
);
gridBagConstraints1 = new java.awt.GridBagConstraints ();
gridBagConstraints1.fill = java.awt.GridBagConstraints.HORIZONTAL;
gridBagConstraints1.insets = new java.awt.Insets (5, 0, 2, 5);
gridBagConstraints1.anchor = java.awt.GridBagConstraints.WEST;
gridBagConstraints1.weightx = 0.1;
getContentPane ().add (addButton, gridBagConstraints1);
renameButton = new javax.swing.JButton ();
renameButton.setText ("Rename");
renameButton.setLabel ("Rename");
renameButton.addActionListener (new java.awt.event.ActionListener () {
public void actionPerformed (java.awt.event.ActionEvent evt) {
renameButtonActionPerformed (evt);
}
}
);
gridBagConstraints1 = new java.awt.GridBagConstraints ();
gridBagConstraints1.gridx = 1;
gridBagConstraints1.fill = java.awt.GridBagConstraints.HORIZONTAL;
gridBagConstraints1.insets = new java.awt.Insets (2, 0, 2, 0);
gridBagConstraints1.anchor = java.awt.GridBagConstraints.WEST;
gridBagConstraints1.weightx = 0.1;
getContentPane ().add (renameButton, gridBagConstraints1);
removeButton = new javax.swing.JButton ();
removeButton.setEnabled (false);
removeButton.setText ("Remove");
removeButton.setLabel ("Remove");
removeButton.addActionListener (new java.awt.event.ActionListener () {
public void actionPerformed (java.awt.event.ActionEvent evt) {
jButton3ActionPerformed (evt);
}
}
);
gridBagConstraints1 = new java.awt.GridBagConstraints ();
gridBagConstraints1.gridx = 1;
gridBagConstraints1.fill = java.awt.GridBagConstraints.HORIZONTAL;
gridBagConstraints1.insets = new java.awt.Insets (2, 0, 2, 0);
gridBagConstraints1.anchor = java.awt.GridBagConstraints.WEST;
gridBagConstraints1.weightx = 0.1;
getContentPane ().add (removeButton, gridBagConstraints1);
okButton = new javax.swing.JButton ();
okButton.setText ("OK");
okButton.setLabel ("OK");
okButton.addActionListener (new java.awt.event.ActionListener () {
public void actionPerformed (java.awt.event.ActionEvent evt) {
okButtonActionPerformed (evt);
}
}
);
gridBagConstraints1 = new java.awt.GridBagConstraints ();
gridBagConstraints1.gridx = 0;
gridBagConstraints1.gridy = 5;
gridBagConstraints1.gridwidth = 2;
gridBagConstraints1.insets = new java.awt.Insets (0, 0, 5, 5);
gridBagConstraints1.anchor = java.awt.GridBagConstraints.EAST;
getContentPane ().add (okButton, gridBagConstraints1);
}//GEN-END:initComponents
private void okButtonActionPerformed (java.awt.event.ActionEvent evt) {//GEN-FIRST:event_okButtonActionPerformed
System.err.println ("OK pressed");
}//GEN-LAST:event_okButtonActionPerformed
private void renameButtonActionPerformed (java.awt.event.ActionEvent evt) {//GEN-FIRST:event_renameButtonActionPerformed
System.err.println ("Rename pressed");
}//GEN-LAST:event_renameButtonActionPerformed
private void addButtonActionPerformed (java.awt.event.ActionEvent evt) {//GEN-FIRST:event_addButtonActionPerformed
System.err.println ("Add pressed");
}//GEN-LAST:event_addButtonActionPerformed
private void jButton3ActionPerformed (java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton3ActionPerformed
// Add your handling code here:
}//GEN-LAST:event_jButton3ActionPerformed
/** Closes the dialog */
private void closeDialog(java.awt.event.WindowEvent evt) {//GEN-FIRST:event_closeDialog
setVisible (false);
dispose ();
}//GEN-LAST:event_closeDialog
// Variables declaration - do not modify//GEN-BEGIN:variables
private java.awt.ScrollPane listScrollPane;
private javax.swing.JButton addButton;
private javax.swing.JButton renameButton;
private javax.swing.JButton removeButton;
private javax.swing.JButton okButton;
private javax.swing.JList list;
// End of variables declaration//GEN-END:variables
public static void main(java.lang.String[] args) {
new CustomizeConfigurationsDialog (new java.awt.Frame (), false).show ();
}
}
/*
* <<Log>>
* 5 Gandalf 1.4 11/27/99 Patrik Knakal
* 4 Gandalf 1.3 10/25/99 Pavel Buzek copyright
* 3 Gandalf 1.2 10/23/99 Ian Formanek NO SEMANTIC CHANGE - Sun
* Microsystems Copyright in File Comment
* 2 Gandalf 1.1 5/4/99 Michal Fadljevic
* 1 Gandalf 1.0 5/4/99 Michal Fadljevic
* $
*/